package org.daidai.abstrusewriting.homepage.classify.model;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

/**
 * Created by Administrator on 2016/10/31.
 */

public class ClassifyList implements Parcelable{
    private List<ClassifyItem> classifyItems;

    public ClassifyList() {
    }

    protected ClassifyList(Parcel in) {
        classifyItems = in.createTypedArrayList(ClassifyItem.CREATOR);
    }

    public static final Creator<ClassifyList> CREATOR = new Creator<ClassifyList>() {
        @Override
        public ClassifyList createFromParcel(Parcel in) {
            return new ClassifyList(in);
        }

        @Override
        public ClassifyList[] newArray(int size) {
            return new ClassifyList[size];
        }
    };

    public List<ClassifyItem> getClassifyItems() {
        return classifyItems;
    }

    public void setClassifyItems(List<ClassifyItem> classifyItems) {
        this.classifyItems = classifyItems;
    }

    @Override
    public String toString() {
        return "ClassifyList{" +
                "classifyItems=" + classifyItems +
                '}';
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeTypedList(classifyItems);
    }
}
